const getToken = () => {
    return localStorage.getItem('token')
}
const setToken = (token) => {
    localStorage.setItem("token", token)
}
const getUserInfo = () => {
    const userInfo = localStorage.getItem("userInfo")
    return userInfo ? JSON.parse(userInfo) : userInfo
}
const setUserInfo = (userInfo) => {
    localStorage.setItem("userInfo", userInfo ? JSON.stringify(userInfo) : userInfo)
}
export {
    getToken,
    setToken,
    getUserInfo,
    setUserInfo
}